package com.zyf.ui;


public class DrawingWindowService {

    private static SelectTypeWindow window;
    private static ImgHandleWindow imgWindow;
    private static VideoHandleWindow videoHandleWindow;
    private static HandleTTSWindow handleTTSWindow;
    private static TxtHandleWindow txtWindow;


    public static void createUI(int windowType) {

        switch (windowType) {
            case 0:
                if (window == null) {
                    window = new SelectTypeWindow();
                }
                window.setVisible(true);
                if (imgWindow != null) {
                    imgWindow.setVisible(false);
                }
                if (videoHandleWindow != null) {
                    videoHandleWindow.setVisible(false);
                }
                if (handleTTSWindow != null) {
                    handleTTSWindow.setVisible(false);
                }
                break;
            case 1:
                if (imgWindow == null) {
                    imgWindow = new ImgHandleWindow();
                }
                imgWindow.setVisible(true);
                window.setVisible(false);
                break;
            case 2:
                if (videoHandleWindow == null) {
                    videoHandleWindow = new VideoHandleWindow();
                }
                videoHandleWindow.setVisible(true);
                window.setVisible(false);
                break;
            case 3:
                if (handleTTSWindow == null) {
                    handleTTSWindow = new HandleTTSWindow();
                }
                handleTTSWindow.setVisible(true);
                window.setVisible(false);
                break;
            case 4:
                if (txtWindow == null) {
                    txtWindow = new TxtHandleWindow();
                }
                txtWindow.setVisible(true);
                window.setVisible(false);
                break;
//            case 6:
//                if (checkTextWindow == null) {
//                    checkTextWindow = new CheckTextWindow();
//                }
//                checkTextWindow.setVisible(true);
//                window.setVisible(false);
//                break;
            default:
                break;
        }

    }


}
